<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<style type="text/css">
ul.rightTools {
	float: right;
	display: block;
}

ul.rightTools li {
	float: left;
	display: block;
	margin-left: 5px
}
</style>
<form id="pagerForm" method="get" model="viewRequest" action="#rel#">
	<input type="hidden" name="viewRequest.page" value="${page.number}" />
	<input type="hidden" name="viewRequest.size" value="${page.size}" />
	<c:forEach items="${viewRequest.params}" var="params">
		<input type="hidden" id="${params.key}"
			name="viewRequest.params['${params.key}']" value="${params.value}" />
	</c:forEach>
	<c:forEach items="${viewRequest.sort}" var="sort">
		<input type="hidden" name="viewRequest.sort.${sort.key}"
			value="${sort.value}" />
	</c:forEach>
</form>
<div class="pageContent">
	<div style="float: left; display: block; overflow: auto; width: 490px; border: solid 1px #CCC; line-height: 21px; background: #fff">
		<div class="pageHeader">
			<form rel="pagerForm"
				onsubmit="return dialogSearch(this);"
				action="${rootUrl}/goods/type-class!dialog" method="get">
				<div class="searchBar">
					<ul class="searchContent">
						<li><label>类型名称：</label> <input type="text"
							name="search_content" value="${search_content}" /></li>
					</ul>
					<div class="subBar">
						<ul>
							<li><div class="buttonActive">
									<div class="buttonContent">
										<button type="submit">检索</button>
									</div>
								</div></li>
						</ul>
					</div>
				</div>
			</form>
		</div>
	<table class="table"  layoutH="128">
		<thead>
			<tr>
				<th width="110">商品类型编码</th>
				<th width="150">商品类型名称</th>
				<th width="110">是否显示</th>
				<th width="110">排序</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.content}" var="typeClass" varStatus="status">
			<tr onclick="javascript:showAttrValue('${typeClass.id}')">
				<td>${typeClass.code}</td>
				<td>${typeClass.name}</td>
				<td>${typeClass.isShow==1?"显示":"隐藏"}</td>
				<td>${typeClass.sort}</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="panelBar">
	<div class="pages">
		<span>显示</span> <select class="combox" name="numPerPage"
			onchange="dialogPageBreak({numPerPage:this.value})">
			<option value="${page.size}">${page.size}</option>
			<option value="20">20</option>
			<option value="50">50</option>
			<option value="100">100</option>
			<option value="200">200</option>
		</select> <span>条，共${page.totalElements}条 </span>
	</div>
	<div class="pagination" targetType="dialog"
		totalCount="${page.totalElements}" numPerPage="${page.size}"
		pageNumShown="10" currentPage="${page.number}"></div>
	</div>
</div>
	 <div id="jbsxBox11" class="unitBox"  style="left:440px; clear: none;">
		</div> 
</div>
<script>
 	function showAttrValue(typeClassId){
		var rel = "jbsxBox11";
		var url = "${rootUrl}/goods/type-value!dialog?typeClassId="+typeClassId;
		var $rel = $("#"+rel);
		$rel.loadUrl(url, {}, function(){
			$rel.find("[layoutH]").layoutH();
		});
	} 
</script>

